home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 2 / Gold Medal Software Volume 2 (Gold Medal) (1994).iso / os2 / cenvi2.arj / BORDER.CMM < prev    next >
Text File  |  1993-11-15  |  665b  |  30 lines

  1. // Border.cmm - Draw a border of asterisks on the screen
  2.  
  3. if defined(_WINDOWS_)
  4.    ScreenSize(30,30);
  5.  
  6. DrawAsteriskBorder();
  7. ScreenCursor(1,1);
  8. getch();
  9.  
  10. DrawAsteriskBorder()
  11. {
  12.    size = ScreenSize();
  13.    ScreenClear();
  14.    // draw top border
  15.    ScreenCursor(0,0);
  16.    for ( col = 0; col < size.col; col++ )
  17.       putchar('*');
  18.    // draw bottom border
  19.    ScreenCursor(0,size.row-2);
  20.    for ( col = 0; col < size.col; col++ )
  21.       putchar('*');
  22.    // draw left and right borders
  23.    for ( row = 0; row < size.row - 1; row++ ) {
  24.       ScreenCursor(0,row);
  25.       putchar('*');
  26.       ScreenCursor(size.col-1,row);
  27.       putchar('*');
  28.    }
  29. }
  30.